package com.syh.core.ddd.infrastructure.repository;

import com.syh.core.ddd.domain.Aggregate;

import java.io.Serializable;

public interface DeleteRepo<Entity extends Aggregate<ID>, ID extends Serializable> extends Repository<Entity, ID> {

  /**
   * 根据id删除
   *
   * @param id
   * @return
   */
  void removeById(ID id);

  /**
   * 根据对象删除
   *
   * @param entity
   * @return
   */
  void remove(Entity entity);

}
